@use '../modules' as *;
@forward 'buttons';

calendar {
  color: $view_fg_color;
  border: 1px solid $border_color;

  &:selected, &:backdrop:selected {
    background-color: $accent_bg_color;
    color: $accent_fg_color;
    border-radius: $button_radius;
  }

  &.header {
    border-bottom-color: $border_color;

    &:backdrop { border-bottom-color: $border_color; }
  }

  &.button {
    @extend %undecorated_button;

    color: $view_fg_color;

    &:hover { background-color: $hover_color; }
    &:active { background-color: $active_color; }
    &:checked {
      background-color: $selected_color;
      &:hover { background-color: $selected_hover_color; }
    }
    &:backdrop { color: $backdrop_fg_color; }
    &:disabled { color: $disabled_fg_color; }
  }

  &.highlight {
    color: $disabled_fg_color;

    &:backdrop { color: $backdrop_disabled_color; }
  }

  &:backdrop {
    color: $backdrop_text_color;
    border-color: $backdrop_borders_color;
  }

  &:indeterminate { color: gtkalpha(currentColor, 0.1); }
}
